package com.github.springcloud.order.client;

import com.github.springcloud.good.dto.CreateGoodDto;
import com.github.springcloud.good.vo.GoodVo;
import com.github.springcloud.order.client.Hystrix.GoodClientHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * Created by zhaozuowen on 2018/7/12.
 */

@FeignClient(value = "good-service", fallback = GoodClientHystrix.class)
public interface GoodClient {

    @GetMapping("/good/getByGoodNo/{goodNo}")
    public GoodVo getByGoodNo(@PathVariable("goodNo")  String goodNo);

    @PostMapping("/good/createGood")
    public void createGood(@RequestBody  CreateGoodDto createGoodDto);


}
